<template>
	<view class="box">
		<Title name="公益文章"></Title>
		<view class="big" @click="toDetail">
			<view class="recommend">
				<text>推荐</text>
			</view>
			<image src="../../static/img/JU49YH%259BRRMG8_)Q%25%25$%7BEI.png" mode=""></image>
			<text>绿色公益：让我们的学校多一点绿色，让我们大家都...</text>
		</view>
		
		<view class="list">
			<view class="item">
				<image src="../../static/img/JU49YH%259BRRMG8_)Q%25%25$%7BEI.png" mode=""></image>
				<view class="right">
					<text class="title">绿色公益：让我们学校多一点绿色，让我们都行动起来。</text>
					<text class="readcount">阅读 50</text>
				</view>
			</view>
			<view class="item">
				<image src="../../static/img/JU49YH%259BRRMG8_)Q%25%25$%7BEI.png" mode=""></image>
				<view class="right">
					<text class="title">绿色公益：让我们学校多一点绿色，让我们都行动起来。</text>
					<text class="readcount">阅读 50</text>
				</view>
			</view>
			<view class="item">
				<image src="../../static/img/JU49YH%259BRRMG8_)Q%25%25$%7BEI.png" mode=""></image>
				<view class="right">
					<text class="title">绿色公益：让我们学校多一点绿色，让我们都行动起来。</text>
					<text class="readcount">阅读 50</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import Title from "../components/title.vue"
	export default {
		components: {
			Title
		},
		methods: {
			toDetail () {
				uni.navigateTo({
					url: "articlei"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		min-height: 100vh;
		background: #fff;
		padding: 0 36rpx;
		
		.big {
			height: 350rpx;
			position: relative;
			
			image {
				width: 100%;
				height: 100%;
				border-radius: 10px;
			}
			
			.recommend {
				width: 127rpx;
				height: 54rpx;
				position: absolute;
				top: 0;
				left: 30rpx;
				background: $yellow;
				border-radius: 0 0 10px 10px;
				font-size: 25rpx;
				color: #fff;
				line-height: 54rpx;
				text-align: center;
				z-index: 2;
			}
			
			& > text {
				width: 600rpx;
				position: absolute;
				color: #fff;
				left: 50%;
				transform: translateX(-50%);
				bottom: 18rpx;
				font-size: 25rpx;
				text-align: center;
			}
			
		}
	
		.list {
			margin-top: 20rpx;
			.item {
				display: flex;
				align-items: center;
				
				image {
					width: 230rpx;
					height: 134rpx;
					border-radius: 10rpx;
				}
				
				.right {
					height: 100%;
					margin-left: 18rpx;
					flex: 1;
					.title {
						font-size: 25rpx;
						display: block;
					}
					
					.readcount {
						font-size: $smallFont;
						color: $subColor;
					}
				}
			}
		}
	}
</style>
